
#ifndef __REALTIMEDATA_H
#define __REALTIMEDATA_H

#include  "cfg_main.h"


__packed typedef struct
{
    INT8U hour;
    INT8U density;
}RTDataTDType;

#if (NEWGWERC)
__packed typedef struct
{
    INT8U valid : 1;
    INT8U inValid : 1;
	INT8U reserved : 6;
}TermCellStatusType;
#endif

void RtdReadRealtimeData(GdSuperFrameType *pLCSuperFrame);
INT8U ReadRealtimeDataOneDUID(LCDataUnitIDType* pDataUnitID, INT8U *pBuf, INT16U bufSize, INT16U *pSize);
INT8U ReadRealtimeDataOneDUIDForSMS(LCDataUnitIDType* pDataUnitID);
void RTDInit(void);
void SaveMeterSampleTmpData(INT8U mp, GdClassBDateFreezeType *sampleDataBuff, INT8U wrMode);
INT8U ReadMPPowerVCFromBuff(INT8U mp, INT8U *pBuf, INT16U *pSize);
INT8U ReadMPViewEnergyFromBuff(INT8U mp, INT8U *pBuf, INT16U *pSize);
INT8U ReadMPViewReverseEnergyFromBuff(INT8U mp, INT8U *pBuf, INT16U *pSize);

#endif

